home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15402 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.4 KB  |  38 lines

  1. Path: sun001.spd.dsccc.com!jmccarty
  2. From: jmccarty@sun1307.spd.dsccc.com (Mike McCarty)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: COLLEGE PROFESSORS! #2
  5. Date: 18 Apr 1996 20:36:59 GMT
  6. Organization: DSC Communications Corporation
  7. Message-ID: <4l695b$e87@sun001.spd.dsccc.com>
  8. References: <8BEC555.02C70031C5.uuout@sourcebbs.com>
  9. NNTP-Posting-Host: sun1307.spd.dsccc.com
  10.  
  11. In article <8BEC555.02C70031C5.uuout@sourcebbs.com>,
  12. DAVID MOHORN <david.mohorn@sourcebbs.com> wrote:
  13. )For those who may have found my previous message entertaining to
  14. )read--and totally absurd--here another from last week.
  15. )
  16. )We have a program that reads a sequential file (50 items or so) and
  17. )placed these items in an array.  Items can be added and deleted from the
  18. )array.  There is only one catch, however.  If you delete an item, it
  19. )really doesn't get deleted.
  20. )
  21. )This is the instructors way of deleting an item from an array:
  22. )
  23. )declare main_array variable for 50 elements
  24. )declare del_array variable for 50 elements
  25.  
  26. An array is -not- a reasonable data structure to use when elements may
  27. need to be added/deleted. A linked list makes more sense. The rest of
  28. the article is, therefore, cut, since I think that -none- of the
  29. solutions using arrays makes any sense.
  30.  
  31. Mike
  32.  
  33. -- 
  34. ----
  35. char *p="char *p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
  36.  
  37. I don't speak for DSC.         <- They make me say that.
  38.